From: Aryeh Gregor Date: Thu, 23 Jul 2009 23:50:04 +0000 (+0000) Subject: Better documentation for dieUsage() X-Git-Tag: 1.31.0-rc.0~40756 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=da31137022583a41763993332955f065ec0d85ce;p=lhc%2Fweb%2Fwiklou.git Better documentation for dieUsage() If I got it wrong, please improve. --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 9879aedd5b..eb77af4b53 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -721,10 +721,15 @@ abstract class ApiBase { } /** - * Call the main module's error handler - * @param $description string Error text - * @param $errorCode string Error code + * Throw a UsageException, which will (if uncaught) call the main module's + * error handler and die with an error message. + * + * @param $description string One-line human-readable description of the + * error condition, e.g., "The API requires a valid action parameter" + * @param $errorCode string Brief, arbitrary, stable string to allow easy + * automated identification of the error, e.g., 'unknown_action' * @param $httpRespCode int HTTP response code + * @param $extradata fixme: document this */ public function dieUsage($description, $errorCode, $httpRespCode = 0, $extradata = null) { wfProfileClose();